﻿<Window x:Class="Canyala.Lagoon.Sample.Presentation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Canyala.Lagoon.Sample.Presentation.ViewModels"
        Title="MainWindow" Height="350" Width="525">
    
    <Window.Resources>
        <local:Person x:Key="MyContext" FirstName="John" LastName="Doe" />
    </Window.Resources>

    <StackPanel DataContext="{StaticResource MyContext}">
        <TextBox Text="{Binding FirstName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBox Text="{Binding LastName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        <TextBlock Text="{Binding FullName, Mode=OneWay}" />
        <TextBlock Text="{Binding WhoLivesWhere, Mode=OneWay}" />
        <TextBox Text="{Binding Address.City, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
    </StackPanel>
    
</Window>
